﻿using System;
using SeizyUtils.Common.Utilities;

namespace SeizyUtils.AppCode.Common.Exceptions
{
    public abstract class HTException : ApplicationException
    {
        public HTException(string message) : base(message)
        {
            printLog(message, null);
        }

        public HTException(string message, Exception e)
            : base(message, e)
        {
            printLog(message, e);
        }

        private void printLog(string message, Exception e)
        {
            Console.Write(message);
            if (e != null)
            {
                Console.Write(e.StackTrace);
            }
        }
    }
}
